//配置路由表
import React from "react";

let Home =React.lazy(()=>import('../pages/home'))
let Login =React.lazy(()=>import('../pages/login'))
let Detail =React.lazy(()=>import('../pages/detail'))
let Chat =React.lazy(()=>import('../pages/chat'))
let My =React.lazy(()=>import('../pages/my'))  
let Collect =React.lazy(()=>import('../pages/collect'))  
const routes = [
    {
        path:'/',
        element:<Home/>
    },
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'/detail/:id',
        element:<Detail/>
    },
    {
        path:'/chat',
        element:<Chat/>
    },
    {
        path:'/my',
        element:<My/>
    },
     {
        path:'/collect',
        element:<Collect/>
    },
]

export default routes